<?php
## include required files
/*******************************/ 
require_once '../../includefiles.php';
include_once("../../model/admindetails.php");
/*******************************/
## Create Objects
/*******************************/
$adminObj = new Model_AdminDetails();

if ($_GET['username']){
	$username = $_GET['username']; 
}
if ($_GET['id']){
	$id = $_GET['id']; 
}

if($username){
// this function check username Exit ot not
	 $result = $adminObj->chkUserNameExist(trim($username), $id); 
	if(count($result) > 0){ 	
		if($result['username'] == $username){  
			echo 'false';
		}
	} else {
		echo "true";	
	}
}
unset($adminObj);
?>


